package elmar.questinaire.db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;


public class Save {
	public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
		Class.forName("com.mysql.jdbc.Driver").newInstance();
		Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","shmily");
		Statement st = con.createStatement();
		ResultSet r = st.executeQuery("select * from t");
	
		while(r.next()){
			System.out.println(r.getInt("a"));
		}
	}
}
